def myfunc(n):
    m = 1
    res = 1
    while m <= n:
        res *= m
        m += 1
    print(res)


while True:
    try:
        myfunc(int(input()))
    except:
        break
